/*
 * File: Fu_Foc.h
 *
 * Code generated for Simulink model 'Fu_Foc'.
 *
 * Model version                  : 1.373
 * Simulink Coder version         : 8.2 (R2012a) 29-Dec-2011
 * TLC version                    : 8.2 (Dec 29 2011)
 * C/C++ source code generated on : Sun Jun 16 10:53:06 2013
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: ARM Compatible->ARM Cortex
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#ifndef RTW_HEADER_Fu_Foc_h_
#define RTW_HEADER_Fu_Foc_h_
#ifndef Fu_Foc_COMMON_INCLUDES_
# define Fu_Foc_COMMON_INCLUDES_
#include <stddef.h>
#include <string.h>
#include "rtwtypes.h"
#include "rtw_shared_utils.h"
#endif                                 /* Fu_Foc_COMMON_INCLUDES_ */

#include "Fu_Foc_types.h"

/* Macros for accessing real-time model data structure */
#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm)        ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val)   ((rtm)->errorStatus = (val))
#endif

/* Block states (auto storage) for system '<Root>' */
typedef struct {
  uint32_T Prelookup_DWORK1;           /* '<S1>/Prelookup' */
  int32_T Memory1_PreviousInput;       /* '<S4>/Memory1' */
  int32_T Memory_PreviousInput;        /* '<S4>/Memory' */
} D_Work_Fu_Foc;

/* Constant parameters (auto storage) */
typedef struct {
  /* Computed Parameter: Prelookup_Breakpoint
   * Referenced by: '<S1>/Prelookup'
   */
  uint16_T Prelookup_Breakpoint[25];

  /* Computed Parameter: cosTable_Table
   * Referenced by: '<S1>/cos-Table'
   */
  int16_T cosTable_Table[25];

  /* Computed Parameter: sinTable_Table
   * Referenced by: '<S1>/sin-Table'
   */
  int16_T sinTable_Table[25];
} ConstParam_Fu_Foc;

/* Real-time Model Data Structure */
struct RT_MODEL_Fu_Foc {
  const char_T * volatile errorStatus;
};

/* Block states (auto storage) */
extern D_Work_Fu_Foc Fu_Foc_DWork;

/* Constant parameters (auto storage) */
extern const ConstParam_Fu_Foc Fu_Foc_ConstP;

/*
 * Exported Global Signals
 *
 * Note: Exported global signals are block signals with an exported global
 * storage class designation.  Code generation will declare the memory for
 * these signals and export their symbols.
 *
 */
extern int16_T Foc_CurrAlpha;          /* '<S2>/Gain2' */
extern int16_T Foc_CurrBeta;           /* '<S2>/Gain3' */
extern int16_T Foc_CurrD;              /* '<S3>/Gain' */
extern int16_T Foc_VoltReqD;           /* '<S4>/Switch3' */
extern int16_T Foc_CurrQ;              /* '<S3>/Gain1' */
extern int16_T Foc_VoltReqQ;           /* '<S4>/Switch2' */
extern int16_T Foc_VoltReqAlpha;       /* '<S5>/Add' */
extern int16_T Foc_VoltReqBeta;        /* '<S5>/Add1' */
extern int16_T Foc_PwmHelperX;         /* '<S7>/Product' */
extern int16_T Foc_PwmHelperY;         /* '<S7>/Product3' */
extern int16_T Foc_PwmHelperZ;         /* '<S7>/Product4' */
extern int16_T Foc_PwmCntr1;           /* '<S6>/Raumzeigermodulation' */
extern int16_T Foc_PwmCntr2;           /* '<S6>/Raumzeigermodulation' */
extern int16_T Foc_PwmCntr3;           /* '<S6>/Raumzeigermodulation' */
extern int16_T Foc_CosTheta;           /* '<S1>/cos-Table' */
extern int16_T Foc_SinTheta;           /* '<S1>/sin-Table' */

/* Model entry point functions */
extern void Fu_Foc_initialize(void);
extern void Fu_Foc_step(void);

/* Real-time Model object */
extern struct RT_MODEL_Fu_Foc *const Fu_Foc_M;

/*-
 * The generated code includes comments that allow you to trace directly
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Use the MATLAB hilite_system command to trace the generated code back
 * to the model.  For example,
 *
 * hilite_system('<S3>')    - opens system 3
 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : 'Fu_Foc'
 * '<S1>'   : 'Fu_Foc/Fu_Foc'
 * '<S2>'   : 'Fu_Foc/Fu_Foc/Clarke-Transformation'
 * '<S3>'   : 'Fu_Foc/Fu_Foc/DQ-Transformation'
 * '<S4>'   : 'Fu_Foc/Fu_Foc/Drehmomentregler'
 * '<S5>'   : 'Fu_Foc/Fu_Foc/Inverse DQ-Transformation'
 * '<S6>'   : 'Fu_Foc/Fu_Foc/Raumzeigermodulation'
 * '<S7>'   : 'Fu_Foc/Fu_Foc/Raumzeigermodulation/PWM-Helper'
 * '<S8>'   : 'Fu_Foc/Fu_Foc/Raumzeigermodulation/Raumzeigermodulation'
 * '<S9>'   : 'Fu_Foc/Fu_Foc/Raumzeigermodulation/SectionDetect'
 */
#endif                                 /* RTW_HEADER_Fu_Foc_h_ */

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
